package com.edu.service.impl;

import java.util.List;
import com.edu.dao.impl.AdminsDaoImpl;
import com.edu.entity.Admins;
import com.edu.service.IAdminService;

public class AdminServiceImpl implements IAdminService{
	AdminsDaoImpl dao=new AdminsDaoImpl();

	@Override
	public List<Admins> getAdmins() {
		return dao.queryAdmins();
	}

	@Override
	public boolean addAdmin(Admins admins) {
		return dao.addAdmin(admins);
	}

	@Override
	public Admins getAdminsByNameandPwd(String adminAccount, String adminPwd) {
		return dao.queryAdminsByNameandPwd(adminAccount, adminPwd);
	}


	@Override
	public boolean logoutAdmin(int adminId) {
		// TODO Auto-generated method stub
		return dao.logoutAdmin(adminId);
	}

	@Override
	public boolean startAdmin(int adminId) {
		// TODO Auto-generated method stub
		return dao.startAdmin(adminId);
	}

	@Override
	public int AdminsNumber() {
		// TODO Auto-generated method stub
		return dao.countAdmins();
	}
}
